package com.cowealth.platform.common.web.util;


import com.cowealth.platform.common.base.vo.result.CommonResult;
import com.cowealth.platform.common.web.constant.CommonWebConstants;

import javax.servlet.ServletRequest;
import java.util.Date;

/**
 * 通用的Web工具类
 *
 * @author : skycdm
 * @version : 1.0.0
 * @date : 2021/2/24 17:17
 */
public class CommonWebUtil {


    public static void setAccessStartTime(ServletRequest request, Date startTime) {
        request.setAttribute(CommonWebConstants.REQUEST_ATTR_ACCESS_START_TIME, startTime);
    }

    public static void setCommonResult(ServletRequest request, CommonResult result) {
        request.setAttribute(CommonWebConstants.REQUEST_ATTR_COMMON_RESULT, result);
    }
}
